<template>
  <div>
    <h2>三方登录</h2>

    <p>输入手机号：<input type="text" v-model="mobile"></p>
    <button @click="add">登录</button>
  </div>
</template>

<script>
export default {
  name: "mobile",
  data(){
    return{
      mobile:''
    }
  },
  methods:{
    add(){
      let uid = '123'
      let tokne = '123'
      let form = new FormData()
      form.append('uid',uid)
      form.append('token',tokne)
      form.append('mobile',this.mobile)
      this.$axios.post('users/Party_API/',form)
      .then(i=>{
        if (i.data.code==200){
          localStorage.setItem('userid',i.data.userid)
          alert(i.data.mes)
          this.$router.push({path:'/zhuye'})
        }
      })
    }

  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
